#ifndef _BSP_MAGNETIC_H
#define _BSP_MAGNETIC_H
// #include "driver/ledc.h"
#include "driver/gpio.h"
#include "bsp_timer.h"
#include "esp_attr.h"
#include "esp_adc/adc_continuous.h"
#define GPIO_MAGANETIC_POWER_ENABLE		    GPIO_NUM_11
#define GPIO_MAGANETIC_VOLTAGE_CTRL_0		GPIO_NUM_34
#define GPIO_MAGANETIC_VOLTAGE_CTRL_1		GPIO_NUM_33
#define GPIO_BRIDGE_CTRL_0                  GPIO_NUM_12
#define GPIO_BRIDGE_CTRL_1                  GPIO_NUM_13
#define GPIO_MAGANETIC_PIN_SEL  ((1ULL<<GPIO_MAGANETIC_POWER_ENABLE) | (1ULL<<GPIO_MAGANETIC_VOLTAGE_CTRL_0) | \
								    (1ULL<<GPIO_MAGANETIC_VOLTAGE_CTRL_1) | (1ULL<<GPIO_BRIDGE_CTRL_0) | (1ULL<<GPIO_BRIDGE_CTRL_1))


#define GPIO_VIB_POWER_ENABLE		GPIO_NUM_14
#define GPIO_VIB_VOLTAGE_CTRL_0		GPIO_NUM_18
#define GPIO_VIB_VOLTAGE_CTRL_1		GPIO_NUM_17
#define GPIO_VIB_OUTPUT_ENABLE		GPIO_NUM_19
#define GPIO_VIB_PIN_SEL        ((1ULL<<GPIO_VIB_POWER_ENABLE) | (1ULL<<GPIO_VIB_VOLTAGE_CTRL_0) | \
                                    (1ULL<<GPIO_VIB_VOLTAGE_CTRL_1) | (1ULL << GPIO_VIB_OUTPUT_ENABLE))


#define CL_BREAK_CHANNEL    	ADC_CHANNEL_9




void magnetic_param_change(uint16_t *magnetic_param);

void magnetic_init(void);

void magnetic_tick_service(void);

void magnetic_break_read(void);


#endif




